// Copyright (c) 2000 Just Objects B.V. <just@justobjects.nl>
// Distributable under LGPL license. See terms of license at gnu.org.

package nl.justobjects.pushlet.core;

/**
 * Subscriber interface for Events from Publisher.
 *
 * @version $Id: Subscriber.java,v 1.3 2003/08/15 08:37:40 justb Exp $
 * @author Just van den Broecke - Just Objects &copy;
 **/
public interface Subscriber {
	public static String FORMAT_JAVASCRIPT = "js";
	public static String FORMAT_SERIALIZED_JAVA_OBJECT = "ser";
	public static String FORMAT_XML= "xml";

	/** Return (remote) Subscriber client's IP address. */
	public String getAddress();

	/** Return subject subscribed to. */
	public String getSubject();

	/** Match event with what the subscriber wants to receive. */
	public boolean match(Event event);

	/** Send event to subscriber. */
	public void send(Event event);
}

/*
 * $Log: Subscriber.java,v $
 * Revision 1.3  2003/08/15 08:37:40  justb
 * fix/add Copyright+LGPL file headers and footers
 *
 * Revision 1.2  2003/05/18 16:15:08  justb
 * support for XML encoded Events
 *
 * Revision 1.1.1.1  2002/09/24 21:02:32  justb
 * import to sourceforge
 *
 * Revision 1.1.1.1  2002/09/20 22:48:18  justb
 * import to SF
 *
 * Revision 1.1.1.1  2002/09/20 14:19:04  justb
 * first import into SF
 *
 * Revision 1.3  2002/04/15 20:42:41  just
 * reformatting and renaming GuardedQueue to BlockingQueue
 *
 * Revision 1.2  2000/08/21 20:48:29  just
 * added CVS log and id tags plus copyrights
 *
 *
 */
